Skip to content

[codex] Hash investor lock cache keys#547

Merged
mikewheeleer merged 1 commit into
Liquifact:mainfrom
MyouzzZ:codex/investor-lock-cache-key-519
Jul 15, 2026
Merged

[codex] Hash investor lock cache keys#547
mikewheeleer merged 1 commit into
Liquifact:mainfrom
MyouzzZ:codex/investor-lock-cache-key-519

Conversation

@MyouzzZ

@MyouzzZ MyouzzZ commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Closes #519

Summary

  • hash investor-lock principal scope and funder query components before storing them in cache keys
  • normalize investor-lock list query params so equivalent requests share a key while tenant, pagination, invoice, and funder inputs still isolate responses
  • add regression coverage for same-invoice cross-funder cache misses and repeated same-funder hits
  • document the updated investor-lock cache key formats
  • restore logger/metrics support needed for the cache middleware tests and CI changed-file lint

Tests

  • npm test -- --silent src/middleware/cache.test.js
  • npx eslint src/middleware/cache.js src/middleware/cache.test.js src/logger.js src/metrics.js
  • npx jest --no-coverage --forceExit tests/escrow.derived.test.js
  • node --check src/index.js

@mikewheeleer

Copy link
Copy Markdown
Contributor

lgtm — merging now

@mikewheeleer
mikewheeleer merged commit 967be4e into Liquifact:main Jul 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add caller-aware throttling-safe escrow read caching to GET /api/investor/locks/:invoiceId

2 participants